Technical Q&A QA1120
IODeviceTree & the IORegistry


Q: Is the IODeviceTree plane in the Mac OS X IORegistry a dynamic plane?

A: No, but first two definitions are in order. They are "plane" and "dynamic"

The IORegistry has various planes which are subsets of the Open Firmware device tree which is a subset of the IORegistry. These planes filter certain nodes and their properties according to I/O function. At present the default plane is IOService with other planes such as IOUSB, IOPower, and IODeviceTree. Some, not all, of these planes are dynamic. So a plane can be the entire IORegistry for the IOService plane or a subset of the IORegistry for certain I/O functions such as USB.

A dynamic planes is one that can detect the connecting of an I/O device such as a USB device. When a USB device is attached or removed the IORegistry is updated for the device. The IODeviceTree plane is static. That is to say it is a direct copy of the Open Firmware device tree as seen by Mac OS X during boot. It is copied into the IORegistry as is and is never updated even after you connect your USB device.

If you are working with IOKit drivers and you need to see your device being attached and/or removed do not use the IODeviceTree plane. Instead use the IOService plane unless your device has a dedicated plane such as FireWire or audio.

The IORegistry is quite a large data structure so using planes, when you can, will result in a filtered subtree which should increase your productivity during searches.

Also notice that not all possible planes will be on every Macintosh computer. For instance, the IOFireWire plane would only be on computers with FireWire.


[Feb 13 2002]


Developer Documentation | Technical Notes | Development Kits | Sample Code